//Andrew Villadsen


//Class player represents a player on the field.
public class Player extends Actor
{
	public double jumpSpeed;
	public double speed;
	public double height = 2;
	public Team team;
	
	public Player(double nspeed, double njumpSpeed)
	{
		speed = nspeed;
		jumpSpeed = njumpSpeed;
	}
	
	public Player(MovementRoutine r, double nspeed, double njumpSpeed)
	{
		routine = r;
		speed = nspeed;
		jumpSpeed = njumpSpeed;
	}
	
	//Sets the player's team.
	public void setTeam(Team t)
	{
		team = t;
	}
	
	//Sets the Player's movement routine if the routine is not a UserMovementRoutine.
	public void setMovementRoutine(MovementRoutine r)
	{
		if(routine == null || !(routine instanceof UserMovementRoutine))
			routine = r;
	}
}